home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 20 / 9 / DISK2092.ZIP / RBBS-LIT.ZIP / LIT / ASMFFIND.LIT < prev    next >
Text File  |  1990-01-13  |  2KB  |  38 lines

  1. *[ASMFFIND.LIT]***************************************************************
  2. * Description: Removes support for BASIC file find                           *
  3. * RBBS-PC Level: CPC17.3                                                √ AM *
  4. * Module Affected: RBBSSUB1.BAS                                              *
  5. * Selection Option: ASMFFIND = ON                                            *
  6. * Additional files: BASFFIND.LIT                                             *
  7. ******************************************************************************
  8. 20219 ' $SUBTITLE: 'FINDITX - subroutine to find if a file exists'
  9. ' $PAGE
  10. '
  11. '  NAME    -- FINDITX
  12. '
  13. '  INPUTS  -- PARAMETER                    MEANING
  14. '             FilName$                 NAME OF FILE TO FIND
  15. '             FileNum                  # TO OPEN FILE AS             ' KG061001
  16. '
  17. '  OUTPUTS -- ZOK                      TRUE IF FILE EXISTS
  18. '             ZErrCode                 ERROR CODE
  19. '
  20. '  PURPOSE -- Determine whether a file exists
  21. '
  22.       SUB FINDITX (FilName$,FileNum) STATIC                          ' KG061001
  23.       ON ERROR GOTO 65000
  24.       ZErrCode = 0
  25.       ZOK = ZFalse
  26.       IF LEN(FilName$) < 1 THEN _
  27.          EXIT SUB
  28.       CALL FindFile (FilName$,ZOK)
  29.       IF NOT ZOK THEN _
  30.         EXIT SUB
  31. 20221
  32. 20222 CLOSE FileNum                                                  ' KG061001
  33. 20223 CALL OpenWork (FileNum,FilName$)                               ' KG061001
  34.       IF ZErrCode = 64 OR ZErrCode = 76 THEN _
  35.          EXIT SUB
  36.       ZOK = ZTrue
  37.       END SUB
  38.